﻿<Window x:Class="P2.Cuberry.Modules.Framework.ModuleManager.XFieldTrackingDetailsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:cal="http://www.codeplex.com/prism"
    xmlns:local="clr-namespace:P2.Cuberry.Modules.Framework.ModuleManager"
    
    Height="389" Width="487"
        
        Icon="/P2.Cuberry;component/Images/CuberryIcon32.ico"
        Title="Peacequare Cuberry"              
        Background="{DynamicResource P2BackgroundBrush}" 
        Loaded="Window_Loaded"
        >

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/P2.Cuberry.Framework.Layout;component/Styles/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Grid>
        <Grid.Resources>
            <Image x:Key="SaveAndNewIcon" Height="16" Width="16" Source="/P2.Cuberry.Modules.Framework.ModuleManager;component/Images/SaveAndNew.ico" />
            <Image x:Key="FindIcon" Height="16" Width="16" Source="/P2.Cuberry.Modules.Framework.ModuleManager;component/Images/find16.gif" />
        </Grid.Resources>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="40" />
            <RowDefinition Height="35" />
            <RowDefinition Height="*"/>
            <RowDefinition Height="35" />
        </Grid.RowDefinitions>

        <!-- Row 0 Start -->

        <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Content="{Translate DialogHeaderFieldTracking}" Style="{StaticResource P2DetailViewHeaderTextStyle}" />

        <Separator Margin="0,0,0,0" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" VerticalAlignment="Bottom" Height="0"/>
        <!-- Row 0 End -->

        <!-- Row 1: Menu Start -->
        <Border  Grid.Row="1" Grid.Column="0"  Style="{StaticResource P2MenuBorderStyle}">
            <Menu Grid.Row="1" x:Name="menuMain" Style="{StaticResource P2MenuStyle}">

                <MenuItem x:Name="SaveBtn" InputGestureText="Ctrl+S" Header="{Translate SaveAndCloseBtn}" Command="{Binding XFieldTrackingSaveCommand}" Style="{StaticResource P2MenuItemStyleSaveAndClose}" />
                <MenuItem x:Name="SaveAndNewBtn" InputGestureText="Ctrl+S" Header="{Translate SaveAndNewBtn}" Command="{Binding XFieldTrackingSaveAndNewCommand}" Icon="{StaticResource SaveAndNewIcon}" Style="{StaticResource P2MenuItemStyle}" />
               
            </Menu>
        </Border>
        <!-- Row 1 End -->
        <!-- Row 2: All Fields -->
        <Border  Grid.Row="2" Grid.Column="0"  Style="{StaticResource P2ContentBorderStyle}">
            <Grid >
                <Label HorizontalAlignment="Left" Margin="5,5,0,0" Name="EntityNameL" Width="120" Content="{Translate EntityNameL}" Height="28" VerticalAlignment="Top"></Label>
                <TextBox  Margin="5,28,0,0" Name="EntityName" Width="120" Text="{Binding FieldEntityName, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"  HorizontalAlignment="Left" Style="{StaticResource P2TextBoxStyle}" Height="23" VerticalAlignment="Top" />

                <Label HorizontalAlignment="Left" Margin="5,0,0,141" Name="FieldNameL" Width="120" Content="{Translate FieldNameL}" Height="28" VerticalAlignment="Bottom"></Label>
                <TextBox  Margin="5,0,0,123" Name="FieldName" Height="23" Width="220" Text="{Binding FieldName, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"  HorizontalAlignment="Left"  VerticalAlignment="Bottom" Style="{StaticResource P2TextBoxStyle}" />
            </Grid>
        </Border>

    </Grid>
</Window>
